<template>
  <div>
    <div>
      <h4>Borg呼吸困难评分</h4>
      <el-row>
        <el-col :span="8">
          <span data>Borg呼吸困难评分: </span>
          <el-input
            v-model="pgForm.borg_dyspnea_score_value"
            @change="scoringCriteria"
            maxlength="3"
            style="width: 50%"></el-input>
          分
        </el-col>
        <el-col :span="14" :offset="2">
          <el-input
            class="input"
            style="width: 70%"
            type="text"
            v-model="pgForm.borg_dyspnea_score_criteria">
          </el-input>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "borg_dyspnea_score",
  title: "Borg呼吸困难评分",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props: {
    fromdata:{},
    istrans:false,
  },
  data() {
    return {
      pgForm: {
        borg_dyspnea_score_value: '',
        borg_dyspnea_score_criteria: '',
      }
    }
  },
  methods: {
    //评分标准
    scoringCriteria(value) {
      console.log(value)
      switch (value) {
        case '0': this.pgForm.borg_dyspnea_score_criteria = "一点也不觉得呼吸困难或者疲劳";break;
        case '0.5': this.pgForm.borg_dyspnea_score_criteria = "非常非常亲为的呼吸困难或者疲劳，几乎难以察觉";break;
        case '1': this.pgForm.borg_dyspnea_score_criteria = "非常轻微的呼吸困难或者疲劳";break;
        case '2': this.pgForm.borg_dyspnea_score_criteria = "轻度的呼吸困难或者疲劳";break;
        case '3': this.pgForm.borg_dyspnea_score_criteria = "重度的呼吸困难或者疲劳";break;
        case '4': this.pgForm.borg_dyspnea_score_criteria = "略严重的呼吸困难或者疲劳";break;
        case '5': this.pgForm.borg_dyspnea_score_criteria = "严重的呼吸困难或者疲劳";break;
        case '6': this.pgForm.borg_dyspnea_score_criteria = "非常严重的呼吸困难或者疲劳";break;
        case '7': this.pgForm.borg_dyspnea_score_criteria = "非常严重的呼吸困难或者疲劳";break;
        case '8': this.pgForm.borg_dyspnea_score_criteria = "非常严重的呼吸困难或者疲劳";break;
        case '9': this.pgForm.borg_dyspnea_score_criteria = "非常非常严重的呼吸困难或者疲劳";break;
        case '10': this.pgForm.borg_dyspnea_score_criteria = "极度的呼吸困难或者疲劳，达到极限";break;
        default: this.pgForm.borg_dyspnea_score_criteria = '';break;
      }
    }
  }
}
</script>

<style scoped>
.el-row{
  margin: 10px 0;
  padding: 20px 20px;
  background-color: #f9f9f9;
}
</style>
